﻿@{
    ViewBag.Title = "_CenterHeader";
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta property="wb:webmaster" content="75b31d181550cf06" />
    <meta charset="utf-8">
    <title>览月齐鲁</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- Le styles -->
    <link href="@Url.Content("~/BootStrap/css/bootstrap.css")" rel="stylesheet" />
    <link href="@Url.Content("~/css/mscook.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Carousel/allinone_thumbnailsBanner.css")" rel="stylesheet" />
    <link href="@Url.Content("~/Carousel/featureCarousel.css")" rel="stylesheet" />
    <!--<script src="http://a.tbcdn.cn/s/kissy/1.3.0/kissy.js"></script>
    <script src="apps/core.js"></script>-->

    <link href="@Url.Content("~/Carousel/accordion.css")" rel="stylesheet" />
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
        <script src="BootStrap/js/html5.js"></script>
        <script src="BootStrap/js/respond.src.js"></script>

    <![endif]-->
    <!--[if lte IE 6]>
        <link rel="stylesheet" type="text/css" href="BootStrap/css/bootstrap-ie6.css">
    <![endif]-->
    <!--[if lte IE 7]>
        <link rel="stylesheet" type="text/css" href="BootStrap/css/ie.css">
    <![endif]-->
    
    <style type="text/css">
        /*.affix {
          top: 50px;
        }
        .affix-top {
          top: 300px;
          position:absolute;
        }
        .affix-bottom {
          bottom: 40px;
          position:absolute;
        }*/
    </style>
</head>
<body>
    @Html.Partial("_Navbar")
    @Html.Partial("_BonusModal")

    @RenderBody()

    @Html.Partial("_BootLogin")

    @{Html.RenderAction("Index", "Foot");
    }

    <script src="@Url.Content("~/BootStrap/js/jquery-1.9.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/BootStrap/js/bootstrap.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/lazyload/unveil.js")"></script>
    <script type="text/javascript">
        $(function () {
            var $ul = $("ul.nav");
            var actionLi = $ul.data("active-li");
            actionLi = actionLi == "Home" ? "" : actionLi;
            $ul.find("li a[href='" + "/" + actionLi + "']").parent().addClass("active");
            if (!placeholderSupport()) {   // 判断浏览器是否支持 placeholder
                $('[placeholder]').focus(function () {
                    var input = $(this);
                    if (input.val() == input.attr('placeholder')) {
                        input.val('');
                        input.removeClass('placeholder');
                    }
                }).blur(function () {
                    var input = $(this);
                    if (input.val() == '' || input.val() == input.attr('placeholder')) {
                        input.addClass('placeholder');
                        input.val(input.attr('placeholder'));
                    }
                }).blur();
            };

            function placeholderSupport() {
                return 'placeholder' in document.createElement('input');
            }
        });
        $(function () {
            $("a.needBonus").on("click", function () {
                $("#bonusModal").modal("show");
                $("#bonusModal p.message").html($(this).data("message"));
                $("#bonusModal p.bonus").html("需消耗" + $(this).data("bonus") + "积分")
                var resourceId = $(this).attr("data-resource");
                $("#makesureTobuy").attr("data-resource", resourceId);
                $("#makesureTobuy").attr("data-url", $(this).data("url"));

                return false;
            });//a click

            $("#makesureTobuy").click(function () {
                var $this = $(this);
                var resourceId = $this.attr("data-resource");
                var skipTo = $this.attr("data-url");
                var url = "@Url.Action("BuyResource", "Account")";
                $.ajax({
                    url: url,
                    data: { resourceId: resourceId },
                    type: "POST",
                    dataType: "json",
                    success: function (data) {
                        if (data.isSucceed) {
                            self.location.href = skipTo;
                        }
                        else {
                            $("#bonusModal p.message").html(data.message);
                        }
                    }

                });
            });


        });

    </script>
    
    <script>
        var $w = $(window);
        var $screen_width = $w.width();
        var $top = $w.scrollTop();
        var $w_height = $w.height();
        var acc_min_width;//accordion
        function checkScreen() {
            if ($screen_width >= 1200) {
                return "wide";
            } else if ($screen_width >= 768 && $screen_width <= 979) {
                return "pad";
            } else if ($screen_width < 768) {
                return "mobile";
            } else {
                return "default";
            }
        }

    </script>

    @RenderSection("JavaScript", required: false)
</body>
</html>
